<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<%@ include file="../../common/jsp/sheetHeader.jsp" %>
<script>
	$(document).ready(function() {
		//sheet 초기화  
		var cfg = {
		    Chart : {
				Animation : true,
		        PlotBackgroundColor : "#FAFAFA",
				PlotBorderColor:"#A9AEB1",
		        PlotBorderWidth:0.5,
				BackgroundColor:{
					LinearGradient : [0,0,100,500],
					Stops : [
						[0, "#D7E1F3"],
						[1, "#FFFFFF"]
					]
				},
				BorderColor : "#84888B",
				
				Type : "column",
		        Style : {
		            FontSize : "20px"
		        }		
		    },
			Credits : {
				Enabled:false
			},
			
			Colors : ["#7AAAEE","#F06F3E","#AAEE6A","#F0E150","#5DA0A9","#75738B"],
			
		    Legend : {
				Enabled:false
		    },
			
		    YAxis : {
		        LineColor : "#7F7F7F",
		        TickInterval : 50,
				GridLineDashStyle : "solid",
		        GridLineWidth : 1,
		        GridLineColor : "#C4C9CD",
		        LineWidth : 1,
		        Title : {
		            Text : ""
		        }
		    }
		}
		
		myChart.SetOptions(cfg);
		myChart.DoSearch("../data/chartdata.xml");
		
	});
	
	function myChartDraw() {
		
		myChart.SetBaseOptions({
			Type:"column"
		},1);
		
		myChart.SetPlotOptions({
			Series:{
				Stacking:"",
				DataLabels:{
					Enabled : true,
					Align : "center",
					Color : "#333333"
				}
			}
		},1);
		
		myChart.Draw();
	}
	
	function runCmd() {
		var cmd = $('#cmdDown').val();
		eval(cmd);
		
		myChart.Draw();
	}
	
</script>
<title>타이틀 및 서브타이틀 속성 예제</title>
</head>
<body>
<div id="main">
	<%@ include file="../../common/jsp/chartNavi.jsp" %>	
	<div id="title">타이틀 및 서브타이틀 속성 예제</div>
	<div id="desc">
		타이틀과 서브타이틀을 화면에 추가한다.<br>
		추가 옵션(align, float, margin, verticalAlign, x, y)을 이용하여 타이틀과 서브타이틀을 이동할 수 있다.<br>
		자세한 내용은 SetTitleOptions(),SetSubTitleOptions() 메서드를 참고한다.
	</div>

	<div id="functionArea">
		<div>
		<textarea id="cmdDown" rows="10" cols="90">
myChart.SetTitleOptions({
    Text:'제목',
    Style:{
       color:"red",
       fontWeight: 'bold'
    }
});
myChart.SetSubTitleOptions({
    Text:'부제목',
});</textarea></div>
		<input type="button" id="btnExe" value="설정 적용" onclick="runCmd()">
	</div>
	
	<div id="viewArea">
		<script type="text/javascript">
			createIBChart("myChart", "1000px", "300px");
		</script>
	</div>
</div>
</body>
</html>